import { request } from "@/utils/request";

const basePrefix = '/ht-smart-house'

/**
 * 获取首页公寓分类享详情
 * @returns {Promise | Promise<unknown>}
 */
export const getApartmentTypeListApi = () => {
    return request({
        url: `${basePrefix}/houseType/getHomeHouseTypeList`,
        method: 'POST'
    })
}

/**
 * 获取首页轮播图数据
 * @returns {Promise<unknown>}
 */
export const getSwiperPicDataListApi = () => {
    return request({
        url: `${basePrefix}/homePrototypeRoom/getHomePrototypeRoomList`,
        method: 'POST'
    })
}

// 客服联系方式
export const getDictConfigListByType = (type) => {
    return request({
        url: `${basePrefix}/dictConfig/getDictConfigListByType?type=${type}`,
        method: 'GET'
    })
}

// 绑定OpenId
export const getAccessToken = (data) => {
    return request({
        url: `/ht-user/user/getAccessToken`,
        method: 'GET',
        type: "application/x-www-form-urlencoded",
        data:data
    })
}
// 门锁列表
export const getUserLockInfoApi = (data) => {
    return request({
        url: `/ht-smart-house/lifeServiceManage/getUserLockInfo`,
        method: 'POST',
        data:data
    })
}
// 房间密码获取
export const getTemporaryPasswordApi = (data) => {
    return request({
        url: `/ht-smart-house/lifeServiceManage/getTemporaryPassword`,
        method: 'POST',
        data:{
            accountNumber: data
        }
    })
}
